#include "cfontmanager.h"
#include "png.h"
#include "cfontrender.h"
#include "cglobal.h"
int main()
{
    CFontRender* render = new CFontRender(screenWidth, screenHeight);

    /*  initialize the fontRnder */
    render->initialize();

    int fontSize = 18;

    /*  load font file */
    render->loadFont("./fonts/SIMHEI.TTF", 0, fontSize, 0, 0, 1);

    /*  render text to the screen texture */
    render->render(L"滚滚长江东逝水，浪花淘尽英雄。", Vec2i(0, 0), fontSize, "SIMHEI", Color(255, 0, 0, 255));
    render->render(L"是非成败转头空。", Vec2i(0, fontSize), fontSize, "SIMHEI", Color(255, 0, 0, 255));
    render->render(L"青山依旧在，几度夕阳红。", Vec2i(0, fontSize * 2), fontSize, "SIMHEI", Color(255, 0, 0, 255));

    /*  export the screen texture to image */
    render->exportScreenImage("./text.png");
    return 0;
}

